<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
                xmlns:h="http://java.sun.com/jsf/html"  
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../templates/FoodSageTemplate.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core">
    
    <ui:define name="logout">
        <p:commandLink id="logoutLink" actionListener="#{touristLogoutManagedBean.doLogout}" value="#{bundle['login.logout.label']}" ajax="false" immediate="true" />
    </ui:define>
    
    <ui:define name="main_menu">
        <p:menubar model="#{touristViewMyFoodSageManagedBean.touristMainMenuModel}"/>
    </ui:define>
 
    <ui:define name="nav_menu">
        <p:menu model="#{touristViewMyFoodSageManagedBean.touristNavMenuModel}"/>
    </ui:define>
    
    <ui:define name="content">
        
        <f:view beforePhase="#{touristViewMyFoodSageManagedBean.initView}" >
            <p:panel id="touristAccountDetail" header="#{bundle['myfoodsage.header.panel']}"  >
                <p:messages id="statusMessages" />

                <p:tabView id="tabViewTouristView" dynamic="false">

                    <p:tab id="tabTouristAccountInfo" title="#{bundle['myfoodsage.accountinfo.tab']}">
                        <h:panelGrid columns="3" cellpadding="5">
                            <h:outputLabel id="touristAccountUsernameLabel" value="#{bundle['myfoodsage.username.label']}" style="font-weight: bold"/>
                            <h:outputText id="username" value="#{touristViewMyFoodSageManagedBean.username}" />
                            <p:message for="username" />

                            <h:outputLabel id="touristAccountLanguageLabel" value="#{bundle['myfoodsage.languagepreferred.label']}" style="font-weight: bold"/>
                            <h:outputText id="language" value="#{touristViewMyFoodSageManagedBean.language}" />
                            <p:message for="language" />
                        </h:panelGrid>
                    </p:tab>

                    <p:tab id="tabTouristPersonalInfo" title="#{bundle['myfoodsage.personalinfo.tab']}">
                        <h:panelGrid  columns="3" cellpadding="5">
                            <h:outputLabel id="touristAccountNameLabel" value="#{bundle['myfoodsage.name.label']}" style="font-weight: bold"/>
                            <h:outputText id="name" value="#{touristViewMyFoodSageManagedBean.name}" />
                            <p:message for="username" />

                            <h:outputLabel id="touristAccountGenderLabel" value="#{bundle['myfoodsage.gender.label']}" style="font-weight: bold"/>
                            <h:outputText id="gender" value="#{touristViewMyFoodSageManagedBean.gender}" />
                            <p:message for="gender"/>

                            <h:outputLabel id="touristAccountBirthdateLabel" value ="#{bundle['myfoodsage.birthdate.label']}" style="font-weight: bold"/>
                            <h:outputText id="birthdate" value="#{touristViewMyFoodSageManagedBean.birthdate}" />
                            <p:message for="birthdate"/>

                            <h:outputLabel id="touristAccountCountryLabel" value ="#{bundle['myfoodsage.country.label']}" style="font-weight: bold"/>
                            <h:outputText id="country" value="#{touristViewMyFoodSageManagedBean.country}" />
                            <p:message for="country"/>

                            <h:outputLabel id="touristAccountEmailLabel" value ="#{bundle['myfoodsage.email.label']}" style="font-weight: bold"/>
                            <h:outputText id="email" value="#{touristViewMyFoodSageManagedBean.email}" />
                            <p:message for="email"/>

                            <h:outputLabel id="touristAccountEmailSecondaryLabel" value ="#{bundle['myfoodsage.emailSecondary.label']}" style="font-weight: bold"/>
                            <h:outputText id="emailSecondary" value="#{touristViewMyFoodSageManagedBean.emailSecondary}" />
                            <p:message for="emailSecondary"/>
                        </h:panelGrid>
                    </p:tab>
                    
                    <p:tab id="tabTouristPersonalPref" title="#{bundle['myfoodsage.personalPref.tab']}">
                        <h:outputLabel id="touristCuisinePrefLabel" value ="#{bundle['myfoodsage.cuisinePref.label']}" style="font-weight: bold"/>
                        <p:dataList id="cuisinePref" value="#{touristViewMyFoodSageManagedBean.cuisinePrefList}" var="cuisineType" itemType="square" >             
                            <p:column>
                                <h:outputText value="#{cuisineType}" />
                            </p:column>
                        </p:dataList>
                        <p:message for="cuisinePref"/>

                        <h:outputLabel id="touristInterestPrefLabel" value ="#{bundle['myfoodsage.interestPref.label']}" style="font-weight: bold"/>
                        <p:dataList id="interestPref" value="#{touristViewMyFoodSageManagedBean.interestPrefList}" var="interest" itemType="square" >             
                            <p:column>
                                <h:outputText value="#{interest}" />
                            </p:column>
                        </p:dataList>
                        <p:message for="interestPref"/>
                    </p:tab>

                </p:tabView>

                <br/>
                <h:commandLink id="myFoodsageEditButton" value="#{bundle['myfoodsage.edit.button']}" action="#{pageRedirectorBean.goEditMyFoodSagePage}" />
            </p:panel>
        </f:view>
    </ui:define>  
    
</ui:composition>

